<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
 */

$oscTemplate->buildBlocks();

if (!$oscTemplate->hasBlocks('boxes_column_left')) {
    $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
}

if (!$oscTemplate->hasBlocks('boxes_column_right')) {
    $oscTemplate->setGridContentWidth($oscTemplate->getGridContentWidth() + $oscTemplate->getGridColumnWidth());
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />
        <title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>
        <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
        <link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6.css" />
        
		<script src="ext/jquery/jquery-1.7.1.min.js" type="text/javascript"></script>

        <!--script type="text/javascript" src="ext/jquery/jquery-1.4.2.min.js"></script-->
        <script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script>
        <script type="text/javascript" src="ext/jquery/jquery.cookie.js"></script>
        <!-- lib of slider thumbs -->
        <script type="text/javascript" src="ext/slider_thumb/jquery.slideViewerPro.1.5.js"></script>
        <script type="text/javascript" src="ext/slider_thumb/jquery.timers.js"></script>
        <link rel="stylesheet" type="text/css" href="ext/slider_thumb/svwp_style.css" />
 
<script type="text/javascript" src="ext/slider_thumb/jquery.lightbox-0.5.js"></script>

<link rel="stylesheet" type="text/css" href="ext/slider_thumb/jquery.lightbox-0.5.css" />


        <script type="text/javascript">
			//BOF - slider thumbs
            var root_website_domain = "<?php echo HTTP_SERVER.DIR_WS_HTTP_CATALOG;?>";            
            $(window).bind("load", function() {
                $("div#piGalNew").slideViewerPro({
                    thumbs: 4, 
                    thumbsPercentReduction: 18,
                    galBorderWidth: 1,
                    galBorderColor: "#e3e3e3",
                    thumbsTopMargin: 10,
                    thumbsRightMargin: 10,
                    thumbsBorderWidth: 1,
                    thumbsActiveBorderColor: "#3d3d3d",
                    thumbsActiveBorderOpacity: 0.8,
                    thumbsBorderOpacity: 1,
                    leftButtonInner: "<img src='"+ root_website_domain +"ext/slider_thumb/images/larw.gif' />",
                    rightButtonInner: "<img src='"+ root_website_domain +"ext/slider_thumb/images/rarw.gif' />",
                    autoslide: false, 
                    typo: false
                });	
            });            
            //EOF - slider thumbs
			function play_video(){                    
    $("div#div_icon_vdeo").hide();  
    $("ul#player_images").hide();  
    var content_video = $("div#host_player_video").html(); 
    $("div#player_video").html(content_video);  
    $("div#player_video").show();  
}

function play_images(){
    $("div#div_icon_vdeo").show();  
    $("ul#player_images").show();  
    $("div#player_video").hide();  
    $("div#player_video").html('');  
} 

            // BOF - calculator charges
            function calculator_charges(dec, error_message){
                var quantity = $('input:text[name=cart_quantity[]]').val();                
                if($('input:text[name=cart_quantity[]]').val()==''){
                    quantity = 0;
                }
                if(isNaN(quantity)){
                    alert(error_message);
                    return false;
                }
                var charge = $('input:hidden[name=products_charges[]]').val(); 
                if($('input:hidden[name=products_charges[]]').val()==''){
                    charge = 0;
                }
                var new_charge = parseInt(quantity)* parseFloat(charge);
                $('span#display_changes').html(new_charge.toFixed(dec));
                return false;
            }
            // EOF - calculator charges     
        </script>
        <?php
        if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
            ?>
            <script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>
            <script type="text/javascript">
                 
                    
          $.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
            </script>
            <?php
        }
        ?>

        <script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>
        <link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />
        <script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
        <link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />
        <link rel="stylesheet" type="text/css" href="stylesheet.css" />
        <link rel="stylesheet" href="jquery/jRating.jquery.css" type="text/css" />
        <?php echo $oscTemplate->getBlocks('header_tags'); ?>
    </head>
    <body>

        <div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>">

            <?php
// BOF: Store Mode
// Hide header.php if not to show
            if (((HEADER_OFF == 'false') && (strstr($PHP_SELF, MAINTENANCE_FILENAME))) || (!strstr($PHP_SELF, MAINTENANCE_FILENAME))) {
                require(DIR_WS_INCLUDES . 'header.php');
            }
// EOF: Store Mode
            ?>

            <div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">

                <!-- include google translation -->
                <script>
                    function googleSectionalElementInit() {
                        new google.translate.SectionalElement({
                            sectionalNodeClassName: 'goog-trans-section',
                            controlNodeClassName: 'goog-trans-control',
                            background: 'transparent'
                        }, 'google_sectional_element');
                    }
                </script> 
                <script src="http://translate.google.com/translate_a/element.js?cb=googleSectionalElementInit&ug=section&hl=es"></script>
